package gbench.appdemo.mall.appitf.im;

import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import gbench.appdemo.mall.data.MallDataApp;
import java.util.List;
import gbench.common.tree.LittleTree.IRecord;

/**
 * 
 * 好友信息
 * 
 * @author gbench
 *
 */
@RequestMapping("/im/friend")
@RestController
public class FriendController {

    /**
     * 
     * @return
     */
    @RequestMapping("add")
    public List<IRecord> add() {
        return dataApp.sqlquery("select * from t_user");
    }

    /**
     * 
     * @return
     */
    @RequestMapping("delete")
    public List<IRecord> delete() {
        return dataApp.sqlquery("select * from t_user");
    }
    
    /**
     * 
     * @return
     */
    @RequestMapping("update")
    public List<IRecord> update() {
        return dataApp.sqlquery("select * from t_user");
    }

    /**
     * 
     * @return
     */
    @RequestMapping("get")
    public List<IRecord> get() {
        return dataApp.sqlquery("select * from t_user");
    }

    public MallDataApp dataApp = new MallDataApp("db1");
}
